﻿<Window x:Class="ObservableKeyedCollection.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <DockPanel LastChildFill="True">
        <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal">
            <TextBox Name="txtKey" Width="150">Key</TextBox>
            <TextBox Name="txtValue" Width="150">Value</TextBox>
            <Button Name="btnAdd" Click="btnAdd_Click">　Add　</Button>
            <Button Name="btnRemove" Click="btnRemove_Click">Remove</Button>
        </StackPanel>
        <UniformGrid Columns="1" Rows="2">
            <DockPanel>
                <Label DockPanel.Dock="Top" Background="LightGray">ObservableKeyedCollection</Label>
                <ListView ItemsSource="{Binding Path=Words}">
                    <ListView.View>
                        <GridView>
                            <GridViewColumn Width="150" Header="KEY" DisplayMemberBinding="{Binding Path=Key}" />
                            <GridViewColumn Width="150" Header="VALUE" DisplayMemberBinding="{Binding Path=Value}" />
                        </GridView>
                    </ListView.View>
                </ListView>
            </DockPanel>
            <DockPanel>
                <Label DockPanel.Dock="Top" Background="LightGray">MultiSetAdaptor</Label>
                <ListView ItemsSource="{Binding Path=SortedWords}">
                    <ListView.View>
                        <GridView>
                            <GridViewColumn Width="150" Header="KEY" DisplayMemberBinding="{Binding Path=Key}" />
                            <GridViewColumn Width="150" Header="VALUE" DisplayMemberBinding="{Binding Path=Value}" />
                        </GridView>
                    </ListView.View>
                </ListView>
            </DockPanel>
        </UniformGrid>
    </DockPanel>
</Window>
